<@override name="title">游戏礼品</@override>

<@override name="viewbody">
<!-- Page title -->
<div class="row">
    <div class="col-md-12">
        <h3 class="page-title">
            游戏管理
            <small>游戏礼品列表</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/admin/home">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    礼品设置
                </a>
            </li>
        </ul>
    </div>
</div>
<!-- /page title -->

<div class="row">
    <div class="col-md-12">
        <div class="portlet box light-grey">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-globe"></i>游戏礼品一览表
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <div class="btn-group">
                        <a id="sample_editable_1_new" href="${ctx}/admin/game/gift/create"  class="btn default green-stripe">
                            新增 <i class="fa fa-plus"></i>
                        </a>
                        <a id="sample_editable_1_new" class="btn default yellow-stripe batchdelete" data-action="${ctx}/admin/game/gift/remove" data-tables="#data-list" data-message="您确认删除所选择的游戏礼品信息么？">
                            删除 <i class="fa fa-ban"></i>
                        </a>
                    </div>
                    <div class="btn-group pull-right">
                        <button class="btn dropdown-toggle" data-toggle="dropdown">其他 <i class="fa fa-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu pull-right">
                            <li>
                                <a href="#">导出Excel
                                </a>
                            </li>
                        </ul>
                    </div>

                </div>
                <table class="table table-striped table-bordered table-hover" id="data-list">
                    <thead>
                    <tr>
                        <th width="30"><input type="checkbox" name="checkall"></th>
                        <th>排序</th>
                        <th>礼品名称</th>
                        <th>可兑换积分</th>
                        <th>图片</th>
                        <th>启用状态</th>
                        <th>礼品类型</th>
                        <th>开始有效时间</th>
                        <th>结束有效时间</th>
                        <th style="text-align: center">操作</th>
                    </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
            </div>

        </div>
    </div>
</div>

<script id="action_template" type="text/x-handlebars-template">
    <div class="table-controls">
        <a href="${ctx}/admin/game/gift/edit/{{id}}" class="btn default blue-stripe" title="编辑"><i
                class="fa fa-edit"></i></a>
        <a href="javascript:void(0);" class="btn default green-stripe" title="状态修改"
           data-hook="ajax-action" data-message="您确定要修改礼品状态吗？"
           data-action="${ctx}/admin/game/gift/status?DATA={{id}}&status={{status}}">
            <i class="fa fa-cogs"></i>
        </a>
        <a href="javascript:void(0);" class="btn default yellow-stripe" title="删除"
           data-hook="remove-action" data-action="${ctx}/admin/game/gift/remove?DATA={{id}}">
            <i class="fa fa-trash-o"></i></a>
    </div>
</script>

<script id="enable_tpl" type="text/x-handlebars-template">
    <span class="label label-sm label-success">
        启用
    </span>
</script>
<script id="nonenable_tpl" type="text/x-handlebars-template">
    <span class="label label-sm label-warning">
        不启用
    </span>
</script>

<script id="pricute_template" type="text/x-handlebars-template">
    {{#if img}}
    <a href="${ctx}{{img}}" class="thumbnail fancybox-button" data-rel="fancybox-button">
        <img class="" src="${ctx}{{thumbnail}}" alt="">
    </a>
    {{else}}
    暂无图片
    {{/if}}
</script>

<@override name="viewparams">
g.actiontpl = '#action_template';
g.enabletpl = '#enable_tpl';
g.nonenabletpl = '#nonenable_tpl';
g.pricutetemplate = '#pricute_template';
</@override>

</@override>
<@override name="viewmodule">gift</@override>
<@extends name="../../_basic/main.ftl"></@extends>
